<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ include file="/views/common/resources.jsp" %>   
<!DOCTYPE html>
<html style="height:100%;">
<head>
	<link rel="icon" href="${basePath}resources/images/login/icon.png" type="image/x-icon"/>
    <title>轨迹回放</title>
    <link href="${basePath}resources/js/common/plugin/select2/css/select2.min.css" rel="stylesheet" />
    <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=d782d52560e7b77e0d764b1496c60dde&plugin=AMap.Geocoder"></script>
    <script src="${basePath}resources/js/common/plugin/echarts/echarts.min.js"></script>
    <script src="//webapi.amap.com/ui/1.0/main.js"></script>
    <script src="${basePath}resources/js/common/plugin/select2/js/select2.min.js"></script>
    <script src="${basePath}resources/js/common/plugin/My97DatePicker/WdatePicker.js"></script>
   	<script src="${basePath}resources/js/common/util/common.js"></script>
    
    <script type="text/javascript">
     var isPlay=false;
     var isVideo=false;
     var vehicleIDTrackLIne="";
     var startTimeTrackLIne="";
     var curTrackLineM=0;
     var endTimeTrackLIne="";
     var startPositionTrackLine="";
     var endPositionTrackLine="";
     var speedList=[];
     var dateList=[];
     var trackInfoArray = [];
     var totalSubsection=null;
     var totalTopDuration=0;
     var totalRunDuration=0;
     var runOrStopDuration=0;
     var exportStartTime="";
     var exportEndTime="";
     var exportVehicleID="";
     var exportAlarmImageTitles="";
     var exportAlarmListInfo=[];
     var exportAlarmColumns=[];
     var exportisRunStopStr="开/停车时长";
     var exportRegistrationNo="";
     $(document).ready(function(){    	
    	trackSubSectin.init();
    	 $('#btnSaveTrackLine').click(function(){
    		 var name=$("#trackLineName").val();
    		 if($.trim(name)==""){
    			 global.ajaxLoading.pop("请输入名称",false,2000);
    				return ;
    		}
    		 var params = [{
	            	  name : 'name',
	            	  value : name
	              },{
	            	  name : 'vehicleID',
	            	  value : vehicleIDTrackLIne
	              },{
	            	  name : 'startTime',
	            	  value : startTimeTrackLIne	
	              },{
	            	  name : 'endTime',
	            	  value : endTimeTrackLIne
	              },{
	            	  name : 'startPositionTrackLine',
	            	  value : startPositionTrackLine
	              },{
	            	  name : 'endPositionTrackLine',
	            	  value : endPositionTrackLine
	              },{
	            	  name : 'curTrackLineM',
	            	  value : curTrackLineM
	              }];
    		 
    		 $.ajax({
    			type : 'post',
    			async : false,
    			url : appCtx + "/gis/matter/saveTrackLineOps.jhtml",
    			cache : false,
    			data:params,
    			dataType : "JSON",
    			success : function(data) {
    				if(data.code==0){
    					$('#trackLinePop').modal('hide');
    					global.ajaxLoading.pop(data.msg,false,2000);
    					
    				}else{
    					global.ajaxLoading.pop(data.msg,false,2000);
    				}
    				
    			}	
    		}); 
    		
         });
    	$("#playTrack").click(function(){
    		if(isPlay){
    			draw.lineObject.marker.resumeMove();
    		}else{
    			if(draw.lineObject.marker!=null){
        			isPlay=true;
        			draw.lineObject.marker.moveAlong(draw.lineObject.lineArr, 5000,currentPoint);
        		}else{
        			global.ajaxLoading.pop("请先查询",false,2000);
        		}
    		}    		
    	});
    	function currentPoint(obj){
    	}
    	$("#exportTack").click(function(){
			if(totalSubsection==null){
				global.ajaxLoading.pop("无数据导出",false,2000);
				return;
			}
    		var monitorListCss = $("#monitorList").css("display");
    		var alarmDetailListCss = $("#alarmDetailList").css("display");
    		var alarmDetailList2Css = $("#alarmDetailList2").css("display");
    		var trackListCss = $("#trackList").css("display");
    		var alarmTrackListCss = $("#alarmTrackList").css("display");
    		exportRegistrationNo="";
    		if(totalSubsection.internalNo==undefined){
    			exportRegistrationNo=totalSubsection.registrationNo;
        	}else{
        		exportRegistrationNo=totalSubsection.registrationNo+totalSubsection.internalNo;
        	}
    		
     		var imageUrl ="";
    		
    		var objTableDataStr=exportRegistrationNo+"#"+totalSubsection.mileage+"#"+totalRunDuration+"#"+totalTopDuration+"#"+totalSubsection.speed_alarm+"#"+totalSubsection.road_level_speed_alarm_count+"#"+totalSubsection.road_overspeed_alarm+"#"+totalSubsection.tired_alarm+"#"+totalSubsection.image_count;
    		var objTableDataTtiles="车牌,总里程,行驶时长,停车时长,超速,道路类型超速,夜间行车,疲劳驾驶,图片";
    		var objTableDataName="轨迹汇总信息";
    		
    		var monitorListDataStr="";
    		var monitorListTtiles="";
    		var monitorListName="";
    		
    		var alarmDetailListDataStr="";
    		var alarmDetailListTtiles="";
    		var alarmDetailListName="";
    		
    		var alarmDetailList2DataStr="";
    		var alarmDetailList2Ttiles="";
    		var alarmDetailList2Name="";
    		
    		var trackListDataStr="";
    		var trackListTtiles="";
    		var trackListtName="";
    		
    		var alarmTrackListDataStr="";
    		var alarmTrackListTtiles="";
    		var alarmTrackListName="";
    		
    		if(monitorListCss!="none"){
    			monitorListDataStr="";
        		monitorListTtiles="总里程(km),"+exportisRunStopStr+",开始时间,结束时间,超速,道路类型超速,夜间行车,疲劳驾驶,图片";
        		monitorListName=$("#tab_1").html();
        		
    			if(runOrStopDuration==1){
    				for(var i=0;i<trackSubSectin.runList.length;i++){
    					if(i==0){
    						monitorListDataStr=parseFloat(trackSubSectin.runList[i].mileage).toFixed(1)+"#"+trackSubSectin.runList[i].duration_time+"#"+trackSubSectin.runList[i].start_time+"#"+trackSubSectin.runList[i].end_time+"#"+trackSubSectin.runList[i].speed_alarm+"#"+trackSubSectin.runList[i].road_level_speed_alarm_count+"#"+trackSubSectin.runList[i].vehicle_night_alarm+"#"+trackSubSectin.runList[i].tired_alarm+"#"+trackSubSectin.runList[i].image_count
    					}else{
    						monitorListDataStr=monitorListDataStr+"&"+parseFloat(trackSubSectin.runList[i].mileage).toFixed(1)+"#"+trackSubSectin.runList[i].duration_time+"#"+trackSubSectin.runList[i].start_time+"#"+trackSubSectin.runList[i].end_time+"#"+trackSubSectin.runList[i].speed_alarm+"#"+trackSubSectin.runList[i].road_level_speed_alarm_count+"#"+trackSubSectin.runList[i].vehicle_night_alarm+"#"+trackSubSectin.runList[i].tired_alarm+"#"+trackSubSectin.runList[i].image_count
    					}
    				}
        		}else if(runOrStopDuration==2){
        			for(var i=0;i<trackSubSectin.stopList.length;i++){
    					if(i==0){
    						monitorListDataStr=parseFloat(trackSubSectin.stopList[i].mileage).toFixed(1)+"#"+trackSubSectin.stopList[i].duration_time+"#"+trackSubSectin.stopList[i].start_time+"#"+trackSubSectin.stopList[i].end_time+"#"+trackSubSectin.stopList[i].speed_alarm+"#"+trackSubSectin.stopList[i].road_level_speed_alarm_count+"#"+trackSubSectin.stopList[i].vehicle_night_alarm+"#"+trackSubSectin.stopList[i].tired_alarm+"#"+trackSubSectin.stopList[i].image_count
    					}else{
    						monitorListDataStr=monitorListDataStr+"&"+parseFloat(trackSubSectin.stopList[i].mileage).toFixed(1)+"#"+trackSubSectin.stopList[i].duration_time+"#"+trackSubSectin.stopList[i].start_time+"#"+trackSubSectin.stopList[i].end_time+"#"+trackSubSectin.stopList[i].speed_alarm+"#"+trackSubSectin.stopList[i].road_level_speed_alarm_count+"#"+trackSubSectin.stopList[i].vehicle_night_alarm+"#"+trackSubSectin.stopList[i].tired_alarm+"#"+trackSubSectin.stopList[i].image_count
    					}
    				}
        		}else{
        			for(var i=0;i<trackSubSectin.allSubList.length;i++){
    					if(i==0){
    						monitorListDataStr=parseFloat(trackSubSectin.allSubList[i].mileage).toFixed(1)+"#"+trackSubSectin.allSubList[i].duration_time+"#"+trackSubSectin.allSubList[i].start_time+"#"+trackSubSectin.allSubList[i].end_time+"#"+trackSubSectin.allSubList[i].speed_alarm+"#"+trackSubSectin.allSubList[i].road_level_speed_alarm_count+"#"+trackSubSectin.allSubList[i].vehicle_night_alarm+"#"+trackSubSectin.allSubList[i].tired_alarm+"#"+trackSubSectin.allSubList[i].image_count
    					}else{
    						monitorListDataStr=monitorListDataStr+"&"+parseFloat(trackSubSectin.allSubList[i].mileage).toFixed(1)+"#"+trackSubSectin.allSubList[i].duration_time+"#"+trackSubSectin.allSubList[i].start_time+"#"+trackSubSectin.allSubList[i].end_time+"#"+trackSubSectin.allSubList[i].speed_alarm+"#"+trackSubSectin.allSubList[i].road_level_speed_alarm_count+"#"+trackSubSectin.allSubList[i].vehicle_night_alarm+"#"+trackSubSectin.allSubList[i].tired_alarm+"#"+trackSubSectin.allSubList[i].image_count
    					}
    				}
        		}
    			
    			
    		}
    		if(alarmDetailListCss!="none"){
        		alarmDetailListTtiles=exportAlarmImageTitles;
        		alarmDetailListName=$("#tab_1").html();
        		
        		
        		for(var i=0;i<exportAlarmListInfo.length;i++){
        			var exportAlarmObj=exportAlarmListInfo[i];
        			
					if(i==0){
						for(var j=0;j<exportAlarmColumns.length;j++){
	        				if(j==0){
	        					alarmDetailListDataStr=alarmDetailListDataStr+exportAlarmObj[exportAlarmColumns[j]];
	        				}else{
	        					if(exportAlarmColumns[j].indexOf("startposition")>-1 || exportAlarmColumns[j].indexOf("intPosition")>-1){
	        						alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj.startlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.startlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("endposition")>-1 || exportAlarmColumns[j].indexOf("outPosition")>-1){
	        						alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj.endlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.endlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("totaltime")>-1){
	    							var numS=parseFloat(exportAlarmObj[exportAlarmColumns[j]]);
	    							var m=(numS/60).toFixed(0);
	    							var s=(numS%60).toFixed(0);
	    							var showStr="";
	    							if(m>0){
	    								if(alarmDetailListName=="疲劳驾驶明细"||alarmDetailListName=="疲劳驾驶报警"){
	    									if(m>60){
	    										showStr=Math.floor(m/60)+"时"+Math.floor(m%60)+"分";
	    									}else{
	    										showStr=m+"分";
	    									}
	    									
	    								}else{
	    									showStr=m+"分"+s+"秒";
	    								}
	    							}else{
	    								showStr=s+"秒";
	    							}
	    							alarmDetailListDataStr=alarmDetailListDataStr+"#"+showStr;
	    						}else if(exportAlarmColumns[j].indexOf("totalmileage")>-1){
	    							alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else if(exportAlarmColumns[j].indexOf("over_speed_mileage")>-1){
	    							alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else{
	        						alarmDetailListDataStr=alarmDetailListDataStr+"#"+exportAlarmObj[exportAlarmColumns[j]];
	        					}
	        					
	        				}
	        			}
					}else{
						for(var j=0;j<exportAlarmColumns.length;j++){
	        				if(j==0){
	        					alarmDetailListDataStr=alarmDetailListDataStr+"&"+exportAlarmObj[exportAlarmColumns[j]];
	        				}else{
	        					if(exportAlarmColumns[j].indexOf("startposition")>-1 || exportAlarmColumns[j].indexOf("intPosition")>-1){
	        						alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj.startlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.startlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("endposition")>-1 || exportAlarmColumns[j].indexOf("outPosition")>-1){
	        						alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj.endlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.endlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("totaltime")>-1){
	    							var numS=parseFloat(exportAlarmObj[exportAlarmColumns[j]]);
	    							var m=(numS/60).toFixed(0);
	    							var s=(numS%60).toFixed(0);
	    							var showStr="";
	    							if(m>0){
	    								if(alarmDetailListName=="疲劳驾驶明细"||alarmDetailListName=="疲劳驾驶报警"){
	    									if(m>60){
	    										showStr=Math.floor(m/60)+"时"+Math.floor(m%60)+"分";
	    									}else{
	    										showStr=m+"分";
	    									}
	    									
	    								}else{
	    									showStr=m+"分"+s+"秒";
	    								}
	    							}else{
	    								showStr=s+"秒";
	    							}
	    							alarmDetailListDataStr=alarmDetailListDataStr+"#"+showStr;
	    						}else if(exportAlarmColumns[j].indexOf("totalmileage")>-1){
	    							alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else if(exportAlarmColumns[j].indexOf("over_speed_mileage")>-1){
	    							alarmDetailListDataStr=alarmDetailListDataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else{
	        						alarmDetailListDataStr=alarmDetailListDataStr+"#"+exportAlarmObj[exportAlarmColumns[j]];
	        					}
	        				}
	        			}
					}
				}	
    		}
    		
    		
    		if(alarmDetailList2Css!="none"){
        		alarmDetailList2Ttiles=exportAlarmImageTitles;
        		alarmDetailList2Name=$("#tab_2").html();

        		for(var i=0;i<exportAlarmListInfo.length;i++){
        			var exportAlarmObj=exportAlarmListInfo[i];
        			
					if(i==0){
						for(var j=0;j<exportAlarmColumns.length;j++){
	        				if(j==0){
	        					alarmDetailList2DataStr=alarmDetailList2DataStr+exportAlarmObj[exportAlarmColumns[j]];
	        				}else{
	        					if(exportAlarmColumns[j].indexOf("startposition")>-1 || exportAlarmColumns[j].indexOf("intPosition")>-1){
	        						alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj.startlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.startlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("endposition")>-1 || exportAlarmColumns[j].indexOf("outPosition")>-1){
	        						alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj.endlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.endlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("totaltime")>-1){
	    							var numS=parseFloat(exportAlarmObj[exportAlarmColumns[j]]);
	    							var m=(numS/60).toFixed(0);
	    							var s=(numS%60).toFixed(0);
	    							var showStr="";
	    							if(m>0){
	    								if(alarmDetailList2Name=="疲劳驾驶明细"||alarmDetailList2Name=="疲劳驾驶报警"){
	    									if(m>60){
	    										showStr=Math.floor(m/60)+"时"+Math.floor(m%60)+"分";
	    									}else{
	    										showStr=m+"分";
	    									}
	    									
	    								}else{
	    									showStr=m+"分"+s+"秒";
	    								}
	    							}else{
	    								showStr=s+"秒";
	    							}
	    							alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+showStr;
	    						}else if(exportAlarmColumns[j].indexOf("totalmileage")>-1){
	    							alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else if(exportAlarmColumns[j].indexOf("over_speed_mileage")>-1){
	    							alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else{
	        						alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+exportAlarmObj[exportAlarmColumns[j]];
	        					}
	        				}
	        			}
					}else{
						for(var j=0;j<exportAlarmColumns.length;j++){
	        				if(j==0){
	        					alarmDetailList2DataStr=alarmDetailList2DataStr+"&"+exportAlarmObj[exportAlarmColumns[j]];
	        				}else{
	        					if(exportAlarmColumns[j].indexOf("startposition")>-1 || exportAlarmColumns[j].indexOf("intPosition")>-1){
	        						alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj.startlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.startlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("endposition")>-1 || exportAlarmColumns[j].indexOf("outPosition")>-1){
	        						alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj.endlon)/1000000).toFixed(6)+"|"+(parseFloat(exportAlarmObj.endlat)/1000000).toFixed(6);
	        					}else if(exportAlarmColumns[j].indexOf("totaltime")>-1){
	    							var numS=parseFloat(exportAlarmObj[exportAlarmColumns[j]]);
	    							var m=(numS/60).toFixed(0);
	    							var s=(numS%60).toFixed(0);
	    							var showStr="";
	    							if(m>0){
	    								if(alarmDetailList2Name=="疲劳驾驶明细"||alarmDetailList2Name=="疲劳驾驶报警"){
	    									if(m>60){
	    										showStr=Math.floor(m/60)+"时"+Math.floor(m%60)+"分";
	    									}else{
	    										showStr=m+"分";
	    									}
	    									
	    								}else{
	    									showStr=m+"分"+s+"秒";
	    								}
	    							}else{
	    								showStr=s+"秒";
	    							}
	    							alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+showStr;
	    						}else if(exportAlarmColumns[j].indexOf("totalmileage")>-1){
	    							alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else if(exportAlarmColumns[j].indexOf("over_speed_mileage")>-1){
	    							alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+(parseFloat(exportAlarmObj[exportAlarmColumns[j]])).toFixed(1);
	    						}else{
	        						alarmDetailList2DataStr=alarmDetailList2DataStr+"#"+exportAlarmObj[exportAlarmColumns[j]];
	        					}
	        				}
	        			}
					}
				}	
    		}
    		
    		if(trackListCss!="none"){
    			trackListTtiles="车牌号码,定位时间,纬度,经度,速度,里程,状态";
        		trackListtName=$("#tab_2").html();
    		}
    		
			if(alarmTrackListCss!="none"){
				alarmTrackListTtiles="车牌号码,定位时间,纬度,经度,速度,里程,状态";
	    		alarmTrackListName=$("#tab_3").html();
    		}
    		
    		
    		
    		
    	
    		
    		//图片
    		
			var imgsrcList=new Array();
    		imgsrcList.push(imageUrl);
    		var imgsrc= $.toJSON(imgsrcList);
    			
    		var totolTitle="";
    		var totolInfo="";
    		var sheetNameArr=['统计信息'];
    		$("#objTitle th").each(function(index){
    			totolTitle+=$.trim($(this).text())+",";
    		});
    		$("#objInfo td").each(function(){
    			totolInfo+=$.trim($(this).text())+",";
    		});
    		totolTitle=totolTitle.substring(0,totolTitle.length-1);
    		totolInfo=totolInfo.substring(0,totolInfo.length-1);
    		
    		var param =  {
    				objTableDataStr:objTableDataStr,
    				objTableDataTtiles:objTableDataTtiles,
    				objTableDataName:objTableDataName,
    	    		
    				monitorListDataStr:monitorListDataStr,
    	    		monitorListTtiles:monitorListTtiles,
    	    		monitorListName:monitorListName,
    	    		
    	    		exportAlarmColumns : exportAlarmColumns.join(","),
    	    		alarmDetailListDataStr:alarmDetailListDataStr,
    	    		alarmDetailListTtiles:alarmDetailListTtiles,
    	    		alarmDetailListName:alarmDetailListName,
    	    		
    	    		alarmDetailList2DataStr:alarmDetailList2DataStr,
    	    		alarmDetailList2Ttiles:alarmDetailList2Ttiles,
    	    		alarmDetailList2Name:alarmDetailList2Name,
    	    		
    	    		trackListDataStr:trackListDataStr,
    	    		trackListTtiles:trackListTtiles,
    	    		trackListtName:trackListtName,
    	    		
    	    		alarmTrackListDataStr:alarmTrackListDataStr,
    	    		alarmTrackListTtiles:alarmTrackListTtiles,
    	    		alarmTrackListName:alarmTrackListName,
    	    		
    				startTime:exportStartTime,  
    				endTime: exportEndTime,  
    				vehicleId:exportVehicleID,
    				newSheetName:'统计信息',
    				totolTitle:totolTitle,
    				totolInfo:totolInfo,
    				colModel:"",
    				vehicleNo:exportRegistrationNo,
    				title:exportRegistrationNo+"轨迹数据",
    				imgsrc:""
    		};

    		post(appCtx+"gis/playback/exportTrackBackInfoOps.jhtml",param);
    		
    		
    	});
    	$("#pauseTrack").click(function(){
    		if(draw.lineObject.marker!=null){
	    		 draw.lineObject.marker.pauseMove();
    		}else{
    			global.ajaxLoading.pop("请先查询",false,2000);
    		}
  		});
    	$("#stopTrack").click(function(){ 
    		if(draw.lineObject.marker!=null){
	    		draw.lineObject.marker.stopMove();
	    		isPlay=false;
    		}else{
    			global.ajaxLoading.pop("请先查询",false,2000);
    		}
  		});
    });
     function isToday(str){
    		var d=new Date(Date.parse(str.replace(/\-/g, "\/")));
    		if (d.toDateString() == new Date().toDateString()){
    			return true;
    		}else{
    			return false;
    		}
    }
     
     function eConsole(param) {
     	var index = param.dataIndex;
     	var indexTrack=trackInfoArray[index];
     	draw.showPoint(indexTrack);
     }
     
     </script>
     <style type="text/css">
     .trackRow{
     	background-color: #F8F8FF;
     }
     td{
     	text-align:left !important;
     }
     th{
     	text-align:left !important;
     }
     </style>
</head>
<body class="trackPlayBack" style="height:100%;">
<div class="page">
	<div class="trackMap">
		<div id="mymap">

		</div>
	</div>
	<div id="showQueryPanel" style="display: none;padding-left: 50px;">
		<a class="satellite"  title="显示查询面板" onclick="trackSubSectin.openQueryCondition();">显示查询面板</a>
	</div>
	<div class="pa"  id="queryCondition">
		<a class="pa close"   onclick="trackSubSectin.closeQueryCondition()"></a>
		<input type="hidden"  id="vid" value="${requestScope.vehicleId}">
		<input type="hidden"  id="regNo" value="${requestScope.regNo}">
		<div id="stylized" class="myform clearfix">
			<div class="list clearfix fl">
				<!-- <label class="fl labelCont" for="vehicleList">选择车辆:</label> -->
        		<select class="fl selectCont" id="selectVehicleSel" name="vehicleList">
        		</select>
			</div>
        	<div class="list clearfix fl">
        		<!-- <label class="fl labelCont" for="txtStartTime">开始时间</label> -->
            	<input type="text"  value="${requestScope.startTime}"  id="startTime" class="inputCont fl Wdate Time_input" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d'})">
        	</div>
        	<div class="list clearfix fl">
        		<!-- <label class="fl labelCont" for="txtEndTime">结束时间</label> -->
            	<input type="text"  id="endTime"  value="${requestScope.endTime}"  class="inputCont Wdate Time_input" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d'})">
        	</div>
       		
        	<a class="list queryBtn fl db" href="javascript:trackSubSectin.clickQuery();">查询</a>
        	<div class="spacer"></div>
		</div>
	</div>
	
	<div id="playControlBox"  style="right: 20px;display: none;">
				<!-- <div id="playControlTitle" style="height: 5px;"> </div> -->
				<div id="playControl">
					<a class="play" id="playTrack"  href="javascript:void(0)" title="播放">
						<i class="play"> 播放</i>
					</a> 
					<a href="javascript:void(0)"  id="pauseTrack" title="暂停" > 
						<i class="stop">暂停</i>
					</a> 
					<a href="javascript:void(0)"  id="stopTrack" title="停止">
						<i class="pause">停止</i>
					</a>
					
					<a href="javascript:void(0)"  id="exportTack" title="导出">
						<i class="export">导出</i>
					</a>
				</div>
			</div>
	
	<!-- <div id="nResizeMoveDiv" class="butDragMove"></div>
    <div id="nResizeDiv" class="butDrag" title="拖拽" style=""> <p> 拖拽</p></div> -->
	<div class="monitor-detail">
		<div class="progressBar clearfix"  id="process_sub" style="display:none;">
		</div>
		<div class="monitorCharts" id="monitorCharts">
			
		</div>
		 
         <div class="trackTab pr">
         	<ul class="trackTabTitle clearfix">
         		<li class="list fl active" id="li_tab_0"><a class="db" href="javascript:tabUtils.tabInt.refash(0);" id="tab_0">轨迹汇总信息</a></li>
         		<li class="list fl" id="li_tab_1"><a class="db" href="javascript:tabUtils.tabInt.refash(1);" id="tab_1">分段轨迹</a></li>
         		<li class="list fl" id="li_tab_2"  style="display: none;"><a class="db" href="javascript:tabUtils.tabInt.refash(2);" id="tab_2">详细轨迹</a></li>
         		<li class="list fl" id="li_tab_3"  style="display: none;"><a class="db" href="javascript:tabUtils.tabInt.refash(3);" id="tab_3">报警段轨迹详情</a></li>
         	</ul>
         	<div class="line pa"></div>
         	<div class="trackTabCont">
         		<div class="car-detail list">
		 			<table class="table" id="objTable" >
                    	<tr id="objTitle" style="background-color: #DDDDDD;">
                    		<th width="20%" align="left">车牌</th>
                    		<th width="8%" align="left">总里程</th>
                    		<th width="12%"  align="left">行驶时长</th>
                    		<th width="12%" align="left">停车时长</th>
                    		<th width="10%" align="left">超速</th>
                    		<th width="10%" align="left">道路类型超速</th>                    	
                    		<th width="10%" align="left">夜间行车</th>
                    		<th width="9%" align="left">疲劳驾驶</th>
                    		<th width="9%" align="left">图片</th>
                    	</tr>
         			</table>
        		 </div>
         		<div class="list">
         			<div id="monitorList" style="display: none;"></div>
         			<div id="alarmDetailList" style="display: none; text-align: center;" >
							<table class="table" id="alarmDetailTable">
					</table>
				</div>
         		</div>
         		<div class="list dn">
         			<div id="alarmDetailList2" style="display: none; text-align: center;" >
							<table class="table" id="alarmDetailTable2"></table>
					</div>			
					<div id="trackList" style="display: none; text-align: center;" >
						<table class="table" id="trackTable">
		                    <tr id="objTitle" style="background-color: #DDDDDD;">
		                    	<th>序号</th>
		                    	<th>定位时间</th>
		                    	<th>纬度</th>
		                    	<th>经度</th>
		                    	<th>速度</th>
		                    	<th>里程</th>
		                    	<th>状态</th>
		                    </tr>
        			 </table>
         			<div  id="moreRows" style="cursor:pointer;padding-top: 0px;font-size: 15px;border-top: -10px;" onclick="trackQuery.moreTrackList('trackTable');">加载更多</div>	
         			</div>
         	</div>
         	 <div class="list dn">
					<div id="alarmTrackList" style="display: none; text-align: center;" >
						<table class="table" id="alarmTrackTable">
		                    <tr id="objTitle" style="background-color: #DDDDDD;">
		                    	<th>序号</th>
		                    	<th>定位时间</th>
		                    	<th>纬度</th>
		                    	<th>经度</th>
		                    	<th>速度</th>
		                    	<th>里程</th>
		                    	<th>状态</th>
		                    </tr>
        			 </table>
         			<div  id="moreRows2" style="cursor:pointer;padding-top: 0px;font-size: 15px;border-top: -10px;" onclick="trackQuery.moreTrackList('alarmTrackTable');">加载更多</div>	
         			</div>
         	</div>
         </div>
	</div>
</div>
<!--详情弹窗   -->
<div class="modal detailPop hide fade" id="detailPop">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="alarmDetailsTitle">历史拍照</h5>
  </div>
  <div class="modal-body">
    <div class="detailTable" id="detailTable">
    	<img alt="历史拍照" src=""  id="hisImage">
    </div>
  </div>
  <div class="modal-footer">
    <a class="btn closeBtn" href="javascript:;" data-dismiss="modal" aria-hidden="true">关闭</a>
  </div>
</div>    

<!--保存线路弹窗   -->
<div class="modal detailPop hide fade" id="trackLinePop" style="width:400px;left:55%">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="tracklinetitle">保存线路</h5>
  </div>
  <div class="modal-body">
    	  	<div style="height: 30px;margin-bottom: 15px;" ><label style="width: 80px;height: 30px;line-height: 30px;text-align: right;margin-right: 5px;margin-bottom: 0;float:left;">线路名称：</label><input id="trackLineName" style="width: 150px;height: 30px;line-height: 30px;border: 1px solid #dedede;border-radius: 5px;"> </div>
  </div>
  <div class="modal-footer">
  	<a class="btn closeBtn" id="btnSaveTrackLine" href="javascript:;" >保存</a>
    <a class="btn" href="javascript:;" data-dismiss="modal" aria-hidden="true">关闭</a>
  </div>
</div>  
<script src="${basePath}resources/js/common/main/HashMap.js"></script>
<script src="${basePath}resources/js/common/main/mapToop.js"></script>
<script src="${basePath}resources/js/common/reportbase.js?v=72"></script>
<script src="${basePath}resources/js/business/gis/trackPlayOps.js?v=82"></script>
<script src="${basePath}resources/js/common/mapUtils.js?v=74"></script>
<script src="${basePath}resources/js/common/main/global.js"></script>
<script src="${basePath}resources/js/common/main/nav.js"></script>
</body>
</html>

